package com.erdos.upc.dao;

import java.util.List;
import java.util.Map;

import com.erdos.common.dao.DaoBase;
import com.erdos.core.entity.Facility;
import com.erdos.upc.entity.BusinessPrivilege;

public interface DataPrivilegeDao extends DaoBase<BusinessPrivilege>{

	/**
	 * 删除角色与数据权限的关联
	 * @param dataPrivilegeId
	 * @author jl
	 * @since  2008-8-11 
	 */
	public void deleteDataPrivilegeRole(Long dataPrivilegeSId);
	
	/**
	 * 建立角色与数据权限的关联
	 * @param dataPrivilegeId
	 * @author jl
	 * @since  2008-8-13 
	 */
   //public void insertDataPrivilegeRole(Long dataPrivilegeSId, SecretRole role, Long controlType);

	/**
	 * 删除数据权限
	 * @param dataPrivilegeSId
	 * @author jl
	 * @since  2008-8-11 
	 */
	public void delete(Long dataPrivilegeSId);
	
	/**
	 * 根据参数返回符合条件的所有过滤掉重复的权限对象集合
	 * @param java.util.Map
	 * @return java.util.List
	 * @author jl
	 * @since  2008-8-11 
	 */
	public List<BusinessPrivilege> findByUserParams(Map<String, Object> params); 
	
	/**
	 * 临时方法，取全部facility
	 * @author jl
	 * @since  2008-8-13 
	 */
	public List<Facility> findFacility();
	
	/**
	 * 检查数据是否为受控权限
	 * @author jl
	 * @since  2008-8-14 
	 */
	public boolean findPrivilegeExist(Map<String, Object> params);
}
